<me:UIGSMATK x:Class="WPFExcelReport.TXJGS04"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIGSMATK.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:BoolToVisibilityConverter x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/> 
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIGSMATK.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        
        <DataGrid  Grid.Row="1"  
                   VerticalAlignment="Top" 
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column" 
                   IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                   IsSynchronizedWithCurrentItem="True" 
                   RowDetailsVisibilityMode="Visible" 
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=GSMVAR, Mode=TwoWay}" Header="{Binding Source={Localization:Translate Word=序号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GSMPOS, Mode=TwoWay}" Header="{Binding Source={Localization:Translate Word=行}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GSMRANT,Converter={StaticResource d10}}" Header="{Binding Source={Localization:Translate Word=比例}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GSMRBEZ,Converter={StaticResource gb2312}, Mode=TwoWay}"   Header="{Binding Source={Localization:Translate Word=代号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GSMRFARBE,Converter={StaticResource gb2312}, Mode=TwoWay}"   Header="{Binding Source={Localization:Translate Word=简称}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GSMRSPZ,Converter={StaticResource gb2312}, Mode=TwoWay}" Header="{Binding Source={Localization:Translate Word=成份}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIGSMATK>
